/**
 * Created by Chris
 */
public class GameRole {
    private String name;
    private int blood;

    public GameRole(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void show() {
        System.out.println("blood " + this.blood);
    }

    public void init() {
        this.blood = 100;
    }

    public void fight() {
        this.blood = 0;
    }

    public RoleState saveState() {
        return new RoleState(blood);
    }

    public void recover(RoleState rs) {
        this.blood = rs.getBlood();
    }
}
